﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace dacli.modelos.clases
{
    public static class Configuraciones
    {
        public static double procIva = 12;
        public static int pedidoInicial = 1;
        public static int facturaInicial = 1;
        public static int numero_ceros = 6;
        public static long usuarioEntro;

        public static void log(string data)
        {
            string filename = "log" + DateTime.Now.ToString("ddMMyy") + ".txt";
            if (System.IO.File.Exists(filename))
            {
                using (StreamWriter sw = File.AppendText(filename))
                {
                    sw.WriteLine("{0} - {1}", DateTime.Now, data);
                    sw.Close();
                }
            }
            else {
                using (StreamWriter sw = File.CreateText(filename))
                {
                    sw.WriteLine("{0} - {1}", DateTime.Now, data); 
                    sw.Close();
                }
            }
        }
    }
}
